package com.googlecode.xbeandatasource.data;


import net.sf.jasperreports.engine.JRException;

import com.googlecode.xbeandatasource.common.EmployeeFactory;
import com.googlecode.xbeandatasource.jasperreport.XBeanDataSource;


/**
 * @author Johny Huang
 *
 */
public class XBeanDataSourceFactory {

	public static XBeanDataSource getBeanDS() throws JRException{
		return new XBeanDataSource(EmployeeFactory.getJohny());
	}
	
	public static XBeanDataSource getListDS() throws JRException{
		return new XBeanDataSource(EmployeeFactory.getJohny(),"colleages");
	}
	
	public static XBeanDataSource getMapDS() throws JRException{
		return new XBeanDataSource(EmployeeFactory.getJohny(),"familyMember");
	}
	
	public static XBeanDataSource getSetDS() throws JRException{
		return new XBeanDataSource(EmployeeFactory.getJohny(),"jobTitle");
	}
}
